/*
- "Roguelike-ism":
    There is a wide variety in creature types, some simple and weak, others complex and dangerous. While you can largely defeat any enemy single-handedly with little effort, a large group of enemies can easily spell your doom. You must also keep your eyes out for rare monsters that can mop the floor with your character.
    "Roguelike-ism" is often a lot of fun, but it usually results in the player dying a lot as he picks up knowledge and makes mistakes against enemies. His/her continued consciousness (i.e. every new character) survives longer and longer with every attempt. Players that like learning will stick around, but those that hate mortality will give up.
*/




mob
	monster
		icon = 'baddies.dmi'
		icon_state = "squido"
		New()
			text = {"<font color = "[pick(textcolors)]">*"}
			Red = rand(1,255)
			Blue = rand(1,255)
			Green = rand(1,255)
			..()
			hp = hpBase
			spawn(2) //This code must be executed AFTER LevelControllers, etc, are created
					//Mean compiled in monsters. :(
				var/LevelController/LC = LevelControllers[src.z]
				LC.MonsterController.MonsterBirth(src)




		var
			exp
			defense
			dropmoney
			moneyup
			moneylow
			damagemax
			damagemin
			monspeed
			ranged_attack // does it fire stuff.


			monType //Lots of bytes
			//mstRat is the default, because some monsters do not yet have these types defined.
			subType = mstRat //Lots of bytes
			hpBase /* base hit points */
			hpMax
			ndice /* + (ndice) d6 */
			speed
			slow
			status = mstatStandard /* really lots of bits - a DWORD - is it sleeping? what? */
			cAttacks
			iAttackCur = 1
			cAttacksRound
			AVMod
		//	list/rgw[3]
			list/rgAttacks = list() //List of ATTACK datums
			hobjlist // What kind of treasure it drops

		hp //HP is currently gotten from hpBase
		lawful = -1

/*
		rat
			icon_state = "rat"
			exp = 1
			attack = /mob/monster/proc/Bite
		goblin
			icon_state = "goblin"
			exp = 1
			dropmoney = 1
			moneyup = 90
			moneylow = 30
			attack = /mob/monster/proc/Club
		kobold
			icon_state = "kobold"
			exp = 2
			attack = /mob/monster/proc/Smash
		hobgoblin
			icon_state = "goblin"
			exp = 2
			dropmoney = 1
			moneyup = 120
			moneylow = 40
			attack = /mob/monster/proc/Club
		bat
			icon_state = "bat"
			exp = 2
			attack = /mob/monster/proc/Bite
		dog
			icon_state = "dog"
			exp = 3
			attack = /mob/monster/proc/Bite
		skeleton
			icon_state = "skeleton"
			exp = 3
			attack = /mob/monster/proc/Smash
		largesnake
			name = "large snake"
			icon_state = "largesnake"
			exp = 3
			attack = /mob/monster/proc/PBite
		viper
			icon_state = "viper"
			exp = 5
			attack = /mob/monster/proc/PBite
		goblinfighter
			name = "goblin fighter"
			icon_state = "goblinfighter"
			exp = 6
			dropmoney = 1
			moneyup = 150
			moneylow = 60
			attack = /mob/monster/proc/Club
		walkingcorpse
			name = "walking corpse"
			icon_state = "walkingcorpse"
			exp = 7
			attack = /mob/monster/proc/Bite
		giantant
			name = "giant ant"
			icon_state = "giantant"
			exp = 8
			attack = /mob/monster/proc/Bite
		slime
			icon_state = "slime"
			exp = 10
			attack = /mob/monster/proc/Smash
		ratman
			icon_state = "ratman"
			exp = 10
			dropmoney = 1
			moneyup = 170
			moneylow = 70
			attack = /mob/monster/proc/Punch
		spider
			icon_state = "spider"
			exp = 10
			attack = /mob/monster/proc/Bite
		bandit
			icon_state = "bandit"
			exp = 10
			dropmoney = 1
			moneyup = 200
			moneylow = 10
			attack = /mob/monster/proc/Steal
		lizard
			icon_state = "lizard"
			exp = 10
			attack = /mob/monster/proc/Bite
		greywolf
			icon_state = "greywolf"
			exp = 11
			attack = /mob/monster/proc/Bite
		scorpian
			icon_state = "scorpian"
			exp = 11
			attack = /mob/monster/proc/PBite
		ogre
			icon_state = "ogre"
			exp = 14
			dropmoney = 1
			moneyup = 220
			moneylow = 100
			attack = /mob/monster/proc/Impale
		glob
			icon_state = "glob"
			exp = 14
			dropmoney = 1
			moneyup = 300
			moneylow = 200
			attack = /mob/monster/proc/Smash
		sneakthief
			icon_state = "sneakthief"
			exp = 15
			dropmoney = 1
			moneyup = 280
			moneylow = 200
			attack = /mob/monster/proc/Steal
		shadow
			icon_state = "shadow"
			exp = 16
			attack = /mob/monster/proc/Slash
		creeper
			icon_state = "creeper"
			exp = 16
			attack = /mob/monster/proc/Bite
		brownbear
			icon_state = "brownbear"
			exp = 17
			attack = /mob/monster/proc/Claw
		woodstatue
			icon_state = "woodstatue"
			exp = 17
			attack = /mob/monster/proc/Hit
		dragon
			dropmoney = 1
			attack = /mob/monster/proc/FireBreath
			whitedragon
				icon_state = "whitedragon"
			greendragon
				icon_state = "greendragon"
			bluedragon
				icon_state = "bluedragon"
			reddragon// all drop $$$
				icon_state = "reddragon"
		manticore
			icon_state = "manticore"
			exp = 10
			attack = /mob/monster/proc/Arrowed
		ghost
			icon_state = "ghost"
			exp = 20
			attack = /mob/monster/proc/Smash
		bronzestatue
			icon_state = "bronzestatue"
			exp = 25
			attack = /mob/monster/proc/Hit
		warrior
			icon_state = "warrior"
			exp = 25
			dropmoney = 1
			moneyup = 400
			moneylow = 200
			attack = /mob/monster/proc/Slash
		wolfman
			icon_state = "wolfman"
			exp = 25
			dropmoney = 1
			moneyup = 350
			moneylow = 200
			attack = /mob/monster/proc/Punch
		cavebear
			icon_state = "cavebear"
			exp = 27
			attack = /mob/monster/proc/Claw
		greywolf
			icon_state = "greywolf"
			exp = 28
			attack = /mob/monster/proc/Bite
		berserker
			icon_state = "berserker"
			exp = 30
			dropmoney = 1
			moneyup = 450
			moneylow = 100
			attack = /mob/monster/proc/Punch
		ironstatue
			icon_state = "ironstatue"
			exp = 35
			attack = /mob/monster/proc/Punch

		wight
			icon_state = "wight"
			exp = 35
			attack = /mob/monster/proc/Hit
		wraith
			icon_state = "wraith"
			exp = 35
			attack = /mob/monster/proc/Punch
		wizard
			icon_state = "wizard"
			hpBase = 30
//			slow = 50
			exp = 45
			dropmoney = 1
			moneyup = 500
			moneylow = 300
		hillgiant
			icon_state = "hillgian"
			exp = 40
			attack = /mob/monster/proc/Club
		bearman
			icon_state = "bearman"
			exp = 40
			dropmoney = 1
			moneyup = 450
			moneylow = 300
			attack = /mob/monster/proc/Claw
		dustelemental
			icon_state = "dustelemental"
			exp = 40
			attack = /mob/monster/proc/Punch
		bullman
			icon_state = "bullman"
			exp = 50
			dropmoney = 1
			moneyup = 350
			moneylow = 325
		twoheadedgiant
			icon_state = "twoheadedgiant"
			exp = 55
			dropmoney = 1
			moneyup = 550
			moneylow = 450
		stonegiant
			icon_state = "stonegiant"
			exp = 55
			dropmoney = 1
			moneyup = 550
			moneylow = 450
		magmaelemental
			icon_state = "magmaelemental"
			exp = 55
		airelemental
			icon_state = "airelemental"
			exp = 55
		frostgiant
			icon_state = "frostgiant"
			exp = 60
			dropmoney = 1
			moneyup = 580
			moneylow = 480
		spikeddevil
			icon_state = "spikeddevil"
			exp = 60
		waterelemental
			icon_state = "waterelemental"
			exp = 60
		fireelemental
			icon_state = "fireelemental"
			exp = 60
		earthelemental
			icon_state = "earthelemental"
			exp = 65
		vampire
			icon_state = "vampire"
			exp = 65
		necromancer
			icon_state = "necromancer"
			exp = 65
			dropmoney = 1
			moneyup = 650
			moneylow = 450
		Hrungnir
			icon_state = "hrungnir"
			exp = 75
			dropmoney = 1
			moneyup = 1001
			moneylow = 1000
		animatedlegs
			exp=60
		/////// end of part one monsters
		abysswraith
			icon_state = "abysswraith"
			exp = 70
		firegiant
			icon_state = "firegiant"
			exp = 75
			dropmoney = 1
			moneyup = 700
			moneylow = 550
		horneddevil
			icon_state = "horneddevil"
			exp = 80
		icedevil
			icon_state = "icedevil"
			exp = 85
		abyssfiend
			icon_state = "abyssfiend"
			exp = 100
		surtur
			icon_state = "surtur"
			exp = 350
			dropmoney = 1
			moneyup = 5550
			moneylow = 5450
*/
		trogdor
			icon_state = "trogdor"
			exp = 4
			hp = 50
			damagemax = 3
			damagemin = 2
			defense = 5
			mp = 0
			dropmoney = 1
			moneyup = 50
			moneylow = 40
			New()
				Walkrand()
				..()
		peasant
			icon_state = "peasant"
			New()
				Walkrand()
				..()
		proc
			Walkrand()
				walk_rand(src,6)

/*
		Racer
			var
				upper
				lower
				percentage
			New()
				icon_state = "[pick(icon_states('baddies.dmi'))]"
				text = {"<font color = "#[rand(111111,999999)]">*"}
				name = "[racefirst] [racesecond]"
				Givenumbers()
				NumtoPercent()
				..()
			proc
				Ai()
					sleep(15)
					if (prob(percentage))
						step(src,dir)
					spawn Ai()
				Givenumbers()
					upper = rand(20)
					lower = rand(10)
					if(upper >= lower)
						var/temp = lower
						lower = upper
						upper = temp
					if(upper == lower)
						upper = upper+1
				NumtoPercent()
					var/temp
					temp = upper/lower
					percentage = temp * 10
*/


// Attack procs

		proc

			Choose_a_thing()


			Stab()

			Slash()

			Smash()

			Bite()

			Kick()

			Punch()

			FireBreath()

			Steal()

			Arrowed()

			PBite()

			Club()

			Impale()

			Claw()

			Hit()